﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LibUpdate
{
    /// <summary>
    /// 需要更新的文件
    /// </summary>
    public class File
    {
        private ActionType _ActionType;
        private string _FileName;
        private string _MD5;
        private string _Path;
        private long _Size;
        private FileType _Type;
        private int _TautologyCount=0;
        private bool _MD5Check;

        /// <summary>
        /// 是否通过md5校验
        /// </summary>
        public bool MD5Check
        {
            get { return _MD5Check; }
            set { _MD5Check = value; }
        }

        /// <summary>
        /// 当前文件重试下载次数
        /// </summary>
        public int TautologyCount
        {
            get { return _TautologyCount; }
            set { _TautologyCount = value; }
        }
        /// <summary>
        /// 文件类型
        /// </summary>
        public FileType Type
        {
            get
            {
                return _Type;
            }
            set
            {
                _Type = value;
            }
        }

        /// <summary>
        /// 文件路径
        /// </summary>
        public string Path
        {
            get
            {
                return _Path;
            }
            set
            {
                _Path = value;
            }
        }

        /// <summary>
        /// 操作类型
        /// </summary>
        public ActionType ActionType
        {
            get
            {
                return _ActionType;
            }
            set
            {
                _ActionType = value;
            }
        }

        /// <summary>
        /// MD5完整性校验值,和文件唯一编码
        /// </summary>
        public string MD5
        {
            get
            {
                return _MD5;
            }
            set
            {
                _MD5 = value;
            }
        }

        /// <summary>
        /// 文件大小（kb）
        /// </summary>
        public long Size
        {
            get
            {
                return _Size;
            }
            set
            {
                _Size = value;
            }
        }

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName
        {
            get
            {
                return _FileName;
            }
            set
            {
                _FileName = value;
            }
        }
    }

}
